<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sj" uri="/struts-jquery-tags" %>


 	<div style="margin: 10px 0 0 0px">

	<hr />

	<s:form id="personAddForm" action="save" method="post" namespace="/add-frame" >

	  <s:actionerror/>
	  <s:hidden name="lamaNivasa.id" />
	  <s:hidden name="operationMode"/>
	  
	  <table id="commonTable" class="darkBlueTbl" width="100%">

	 	<tr>
	 		<th>Title</th><td><table><s:select name="person.title" list="personTitleList" listKey="listKey" listValue="listValue"/></table></td>
	 	</tr>
	 	<tr>
	 		<th>Name</th><td  colspan="5"><table><s:textfield name="lamaNivasa.name" cssStyle="width:350px" required="true" /></table></td>
	 	</tr>
	 	<tr>
	 		<th>Sex</th><td><table><s:select name="person.sex" list="personSexList" listKey="listKey" listValue="listValue"/></table></td>
	 	</tr>
	 	<tr>
	 		<th>Date of Birth</th><td  colspan="3"><table>
	 		<sj:datepicker
     				id="dateOfBirth"
     				name="person.dateOfBirth"
     				changeMonth="true"
     				changeYear="true"
     				yearRange="1912:2012"
     				value="%{person.dateOfBirth.time}"
   				/></table></td>
			<th>Age</th>
	 		<td colspan="2"><table> <sj:spinner
		    	name="person.Age" id="AgeSpinner"
		    	min="0" max="120" step="1"
		    	cssStyle="width:60px" required="true" mouseWheel="true"
		    	tooltip="Age in Years"/>
    			</table></td>
	 	</tr>
	 	<tr>
	 		<th>National Identity Card no</th><td  colspan="5"><table><s:textfield name="person.nic" cssStyle="width:350px" required="true" /></table></td>
	 	</tr>
	 	<tr>
	 		<th>Address</th><td  colspan="5"><table><s:textfield name="person.address" cssStyle="width:350px" required="true" /></table></td>
	 	</tr>
	 	<tr><th>Div. Secretariat</th>
	 			<td colspan="5">
	 				<table>  <sj:autocompleter
			  		id="person.divisionalSecretariat.id"
		     		name="person.divisionalSecretariat.id"
		     		list="%{divisionalSecretariatList}"
		     		listKey="id" listValue="name"
		     	/></table></td>
	 	</tr>
		<tr><th>Police Station</th>
	 			<td colspan="5">
	 				<table>  <sj:autocompleter
			  		id="person.policeStation.id"
		     		name="person.policeStation.id"
		     		list="%{policeStationList}"
		     		listKey="id" listValue="name"
		     	/></table></td>
	 	</tr>
	 	<tr><th>Grama Sevaka</th>
	 			<td colspan="5">
	 				<table>  <sj:autocompleter
			  		id="person.gramaSevaka.id"
		     		name="person.gramaSevaka.id"
		     		list="%{gramaSevakaList}"
		     		listKey="id" listValue="name"
		     	/></table></td>
	 	</tr>



	 	<tr>
	 		<th>Telephone</th><td><table><s:textfield name="person.telephone"  cssStyle="width:150px" required="true" /></table></td>
	 		<th>Fax</th><td><table><s:textfield name="person.fax"  cssStyle="width:150px" /></table></td>
	 		<th>Email</th><td><table><s:textfield name="person.email"  cssStyle="width:200px" /></table></td>
	 	</tr>

 		
		<tr>
	 		<th></th><td colspan="5"><table><sj:submit value="Submit" targets="lamaNivasaResultDiv"/></table></td>

	 	</tr>

	   </table>
	</s:form>

</div>